home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / devel-docs / libgimp / sgml / gimputils.sgml < prev    next >
Encoding:
Text File  |  2003-05-20  |  4.0 KB  |  115 lines

  1. <refentry id="libgimp-gimputils" revision="19 Jan 2001">
  2. <refmeta>
  3. <refentrytitle>gimputils</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. <refmiscinfo>LIBGIMP Library</refmiscinfo>
  6. </refmeta>
  7.  
  8. <refnamediv>
  9. <refname>gimputils</refname><refpurpose>Simple utility functions that don't have their own category.</refpurpose>
  10. </refnamediv>
  11.  
  12. <refsynopsisdiv><title>Synopsis</title>
  13. <synopsis>
  14.  
  15.  
  16.  
  17. <link linkend="gchar">gchar</link>*      <link linkend="gimp-strescape">gimp_strescape</link>                  (const <link linkend="gchar">gchar</link> *source,
  18.                                              const <link linkend="gchar">gchar</link> *exceptions);
  19. <link linkend="gchar">gchar</link>*      <link linkend="gimp-strcompress">gimp_strcompress</link>                (const <link linkend="gchar">gchar</link> *source);
  20. </synopsis>
  21. </refsynopsisdiv>
  22.  
  23.  
  24.  
  25.  
  26.  
  27. <refsect1>
  28. <title>Description</title>
  29. <para>
  30. Right now all you find here is a function taken from glib-1.3 that 
  31. we need in several places. Since Gimp doesn't rely on glib-1.3, we
  32. provide it here.
  33. </para>
  34. </refsect1>
  35.  
  36. <refsect1>
  37. <title>Details</title>
  38. <refsect2>
  39. <title><anchor id="gimp-strescape">gimp_strescape ()</title>
  40. <programlisting><link linkend="gchar">gchar</link>*      gimp_strescape                  (const <link linkend="gchar">gchar</link> *source,
  41.                                              const <link linkend="gchar">gchar</link> *exceptions);</programlisting>
  42. <para>
  43. Escapes special characters in a string in the same way as in the
  44. C language, i.e. either with one of the sequences \b, \f, \n, \r,
  45. \t, \\, \", or as a three-digit octal escape sequence \nnn.
  46. </para>
  47. <para>
  48. If the list of exceptions is NULL, all ASCII control characters,
  49. the backslash character, the double-quote character, and all
  50. non-ASCII characters are escaped.
  51. </para>
  52. <para>
  53. If glib > 1.3 is installed this function is identical to 
  54. <link linkend="g-strescape">g_strescape</link>(). For systems using glib-1.2 this function provides the 
  55. added functionality from glib-1.3.</para>
  56. <para>
  57.  
  58. </para><informaltable pgwide=1 frame="none" role="params">
  59. <tgroup cols="2">
  60. <colspec colwidth="2*">
  61. <colspec colwidth="8*">
  62. <tbody>
  63. <row><entry align="right"><parameter>source</parameter> :</entry>
  64. <entry> A string to escape special characters in.
  65. </entry></row>
  66. <row><entry align="right"><parameter>exceptions</parameter> :</entry>
  67. <entry> A string holding characters not to be escaped.
  68. </entry></row>
  69. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A newly allocated copy of the string, with all special
  70. characters escaped as in the C language.
  71. </entry></row>
  72. </tbody></tgroup></informaltable></refsect2>
  73. <refsect2>
  74. <title><anchor id="gimp-strcompress">gimp_strcompress ()</title>
  75. <programlisting><link linkend="gchar">gchar</link>*      gimp_strcompress                (const <link linkend="gchar">gchar</link> *source);</programlisting>
  76. <para>
  77. Does the opposite of <link linkend="g-strescape">g_strescape</link>(), that is it converts escaped
  78. characters back to their unescaped form.
  79. </para>
  80. <para>
  81. Escaped characters are either one of the sequences \b, \f, \n, \r,
  82. \t, \\, \", or a three-digit octal escape sequence \nnn.
  83. </para>
  84. <para>
  85. If glib > 1.3 is installed this function is identical to 
  86. <link linkend="g-strcompress">g_strcompress</link>(). For systems using glib-1.2 this function provides 
  87. the functionality from glib-1.3.</para>
  88. <para>
  89.  
  90. </para><informaltable pgwide=1 frame="none" role="params">
  91. <tgroup cols="2">
  92. <colspec colwidth="2*">
  93. <colspec colwidth="8*">
  94. <tbody>
  95. <row><entry align="right"><parameter>source</parameter> :</entry>
  96. <entry> A string to that has special characters escaped.
  97. </entry></row>
  98. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A newly allocated copy of the string, with all escaped 
  99. special characters converted to their unescaped form.
  100. </entry></row>
  101. </tbody></tgroup></informaltable></refsect2>
  102.  
  103. </refsect1>
  104.  
  105.  
  106.  
  107. <refsect1>
  108. <title>See Also</title>
  109. <para>
  110. <link linkend="g-strescape">g_strescape</link>()
  111. </para>
  112. </refsect1>
  113.  
  114. </refentry>
  115.